//
//  Const.swift
//  DLuxTravel
//
//  Created by llt on 2018/4/16.
//  Copyright © 2018年 imguider. All rights reserved.
//

import UIKit

//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ 常用颜色 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
// 标题颜色
let kTitleColor = UIColor.hexStringToColor(hexString:"#2A3B42")
// 子标题颜色
let kSubitleColor = UIColor.hexStringToColor(hexString:"#3E3D3D")
// 内容颜色
let kContentColor = kTitleColor.withAlphaComponent(0.5)
// 背景颜色
let kBgColor = UIColor.hexStringToColor(hexString: "#F8F6F6")
// 遮罩颜色
let kMaskColor = kTitleColor.withAlphaComponent(0.2)

let kTopRedColor = UIColor.hexStringToColor(hexString:"#A05A66")

//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ 常用尺寸 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
let kScreenHeight = Int(UIScreen.main.bounds.size.height)
let kScreenWidth = Int(UIScreen.main.bounds.size.width)
let kStatusBarHeight = Util.isNotch ? 44 : 20
let kNavigationBarHeight = Util.isNotch ? 88 : 64
let kTableBarHeight = Util.isNotch ? 83 : 49
let kBottomHeight = Util.isNotch ?  34 : 0

let kPerPage = 10

let thumbImageWidth = 300

//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ 判断机型 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
let ISiPhone4 = UIScreen.main.currentMode?.size.equalTo(CGSize(width: 640, height: 960)) ?? false
let ISiPhone5 = UIScreen.main.currentMode?.size.equalTo(CGSize(width: 640, height: 1136)) ?? false
let ISiPhone6 = UIScreen.main.currentMode?.size.equalTo(CGSize(width: 750, height: 1334)) ?? false
let ISiPhone6p = UIScreen.main.currentMode?.size.equalTo(CGSize(width: 1242, height: 2208)) ?? false
let ISiPad = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.pad

//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ 版本号 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
// 系统版本号
let kSystemVersion = Double(UIDevice.current.systemVersion)!
let kiOS9Later = kSystemVersion > 9.0
let kiOS10Later = kSystemVersion > 10.0
let kiOS11Later = kSystemVersion > 11.0
let kiOS12Later = kSystemVersion > 12.0
// App版本号
let kVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString")
let kVersionBuild = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion")

//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ 常用字体字号 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
let fontName1 = "PingFang-SC-Regular"

let kFont10 = UIFont(name: fontName1, size: 10)
let kFont12 = UIFont(name: fontName1, size: 12)
let kFont14 = UIFont(name: fontName1, size: 14)
let kFont17 = UIFont(name: fontName1, size: 17)

//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ 域名 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
//let kDomain = "http://domestic.imguider.com/"
let kDomain = "https://www.imguiderx.com/"
let kSerPath = "xtrip-client/service/"

//▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ 自定义常量 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
let kMaskTag = 1000

let kEdgeDistance = 20

let kCCellInteritemSpacing = 10
let kCCellLineSpacing = 20

